package com.example.student.model;

import lombok.Data;

import java.util.List;

@Data
public class PageResult<T> {
    
    /**
     * 总记录数
     */
    private long total;
    
    /**
     * 数据列表
     */
    private List<T> list;
    
    /**
     * 当前页
     */
    private int pageNum;
    
    /**
     * 每页大小
     */
    private int pageSize;
    
    public PageResult() {
    }
    
    public PageResult(List<T> list, long total) {
        this.list = list;
        this.total = total;
    }
    
    public PageResult(List<T> list, long total, int pageNum, int pageSize) {
        this.list = list;
        this.total = total;
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }
} 